package com.hdcircles.autoform.presenter.contract;

import com.cengalabs.flatui.views.FlatEditText;
import com.hdcircles.autoform.base.BasePresenter;
import com.hdcircles.autoform.base.BaseView;
import com.hdcircles.autoform.model.bean.FormBean;
import com.hdcircles.autoform.model.bean.QuestionBean;

import java.util.List;

/**
 * Created by hdcircles on 2016/10/15.
 */

public interface FormContract  {

    interface View extends BaseView{



        void showQuestion(List<QuestionBean> questionList);

        void saveFormSuccess();

        void scrollToPosition(int position);

        void showLocation(String location, String address,FlatEditText editText);

        void notifyChange();
    }

    interface Presenter extends BasePresenter<View>{

        void uploadImage(String path,QuestionBean questionBean,boolean isLast);


        void getQuestion(String formId);

        void getChoose(QuestionBean question);

        boolean validate(List<QuestionBean> questionList);

        void saveForm(FormBean form);

        void editFormData(FormBean originForm, List<QuestionBean> questionList);

        void getLocation(FlatEditText view);

        void createMapData(String tableId,String name,String address);


    }
}
